﻿#:import DisableableButton ui.disableable_button.DisableableButton
#:import FittableButton ui.fittable_widgets.FittableButton
<QuickGameSettings>:
    orientation: 'vertical'
    size: root.size
    settings_frame: mid
    BoxLayout:
        size_hint_y: None
        height: root.height*0.1
        FittableButton:
            color: 1,0,0,1
            text: _('Back')
            on_release: root.go_back()

        FittableButton:
            color: 0,1,0,1
            text: _('Next')
            on_release: root.next_view()
    BoxLayout:
        id: mid
        size_hint_y: 5
        orientation: 'vertical'
    Label:
        size_hint_y: 5

<SettingField>:
    inp: input
    orientation: 'horizontal'
    plus_btn: plus_btn
    minus_btn: minus_btn

    Label:
        text: root.label
    BoxLayout:
        orientation: 'horizontal'
        DisableableButton:
            id: minus_btn
            text: '-'+str(root.step if root.step > 1 else '')
            on_release: root.change_property(-root.step, root.inp)
        TextInput:
            text: ''
            id: input
            on_focus: root.read_property(self)
            multiline: False
            focus: True
        DisableableButton:
            id: plus_btn
            text: '+'+str(root.step if root.step > 1 else '')
            on_release: root.change_property(root.step, root.inp)
